;options results;parse arg command args;command=upper(command);args=strip(args);div=x2c('01');if getclip('st_init')~=1 then load();Select;when command='SENS' then sensors();when command='IGTIME' then igtime();when command='ASND' then asnd();when command='FLOODP' then floodp();when command='AGET' then autoget();when command='AJOIN' then autojoin();when command='PROT' then prot();when command='CTCP' then ctcpauto();when command='NHP' then nhp();when command='AUTOP' then autop();when command='FPROT' then fprot();when command='XDCC' then xdcc();when command='XSLOT' then xslot();when command='SEC' then sec();when command='XDCCM' then xdccm();when command='XDCCK' then xdcckick();when command='RVG' then rvg();when command='SHIT' then shit();when command='SAVE' then save();when command='ADDF' then addf();when command='DELF' then delf();when command='LISTF' then listf();when command='LOAD' then load();when command='SAVEF' then savef();when command='COMP' then comprefix();when command='LISTK' then listk();when command='ADDK' then addk();when command='DELK' then delk();when command='FMSG' then floodmsg();when command='CHAN' then chan();when command='ADDH' then addh();when command='ICON' then icon();when command='SETF' then setf();when command='BITCH' then deop();when command='BITCHC' then deopc();when command='LOG' then log();when command='PAGE' then page();when command='HLOG' then hlog();when command='MDEOP' then mdeop();when command='MBAN' then mban();when command='MUBAN' then muban();when command='MOP' then mop();when command='MJOIN' then mjoin();when command='MKICK' then mop();when command='SBAN' then sban();when command='PASS' then password();when command='RENM' then rename();when command='DELH' then delh();when command='DISPU' then whois();when command='SHOWU' then showu();when command='MAXK' then maxk();when command='BANK' then bank();when command='KICKMSG' then kickmsg();when command='CHECK' then check();when command='OPDEL' then autopdel();when command='RANDEL' then randel();when command='XRATE' then xdccrate();when command='AWTXT' then awtxt();when command='STYLE' then xstyle();when command='SHOWC' then showc();when command='AWNICK' then awnick();when command='XANSI' then xansi();when command='AMSND' then amsound();when command='RVGA' then rvgm();when command='SAVEB' then saveb();when command='DCCLOG' then dcclog();when command='IDENT' then ident();when command='AWVRB' then awayverb();otherwise;pr='KHelp';cecho(pr,und(bld('Kuang Eleven Config')));cecho(pr,inv('Channel Protection:'));cecho(pr,'NHP - NetHack Channel Protection' wt('nhp'));cecho(pr,'PROT - Channel Protection' wt('prot'));cecho(pr,'MDEOP- Protect from MassDeop' wt('mdeop'));cecho(pr,'MBAN - Protect from MassBan' wt('mban'));cecho(pr,'MUBAN - Protect from MassUnBan' wt('muban'));cecho(pr,'MOP - Protect from MassOp' wt('mop'));cecho(pr,'SBAN - Protect from ScrewBans' wt('sban'));cecho(pr,'MJOIN - Protect from MassJoin' wt('mjoin'));cecho(pr,'SHOWC - Show configuration for this channel');cecho(pr,inv('Flood Protection:'));cecho(pr,'SENS - Set Sensors');cecho(pr,'FLOODP - Flood Protection' wt('floodp'));cecho(pr,'IGTIME - Set Flood Ignore Time' wt('ig_count'));cecho(pr,'FMSG - Set Flood Msg' wt('floodmsg'));cecho(pr,inv('Userlist:'));cecho(pr,'CHAN - Set AutoChannels' wt('autochannels'));cecho(pr,'COMP - Set Channel Command Prefix' wt('comprefix'));cecho(pr,'IDENT - Toggle CTCP Ident function' wt('ctcpident'));cecho(pr,'PASS - Set global password');cecho(pr,'CTCP - CTCP Commands' wt('ctcpauto'));cecho(pr,'AUTOP - AutoOp Friends' wt('autop'));cecho(pr,'OPDEL - AutoOp delay' wt('autopdel'));cecho(pr,'RANDEL- AutoOp delay - random ' wt('randel'));cecho(pr,'BITCH - Deop Non Friends' wt('deop') 'on' wt('deopc') '(/KC BITCHC)');cecho(pr,'FPROT - Friends Protection' wt('fprot'));cecho(pr,'RVG - Revenge Mode' wt('rvg'));cecho(pr,'RVGA - Revenge Actions Deop:'wt('rvgd') 'Kick:'wt('rvgk') 'Ban:'wt('rvgb'));cecho(pr,'SAVEB - Fast Ban/Deop/Kick when banned' wt('saveban'));cecho(pr,'KICKMSG - Friends Protection Kick Msg' wt('pkickmsg'));cecho(pr,'ADDF - Add a friend');cecho(pr,'DELF - Delete a friend');cecho(pr,'ADDH - Add a hostmask to a friend');cecho(pr,'DELH - Delete a hostmask from a friend');cecho(pr,'SETF - Set flags for friend');cecho(pr,'RENM - Rename Friend');cecho(pr,'SHOWU - Show user');cecho(pr,'CHECK - Check if a user/nick/hostmask is in database');cecho(pr,'LISTF - List Friends');cecho(pr,'SAVEF - Save Friends list');cecho(pr,inv('Kickwords:'));cecho(pr,'SHIT - KickWords' wt('shit'));cecho(pr,'ADDK - Add a KickWord');cecho(pr,'DELK - Delete a KickWord');cecho(pr,'LISTK - Show KickWords List');cecho(pr,'BANK - Ban on kickwords' wt('bankickwords'));cecho(pr,'MAXK - Set number of WordKicks before Ban' wt('maxword'));cecho(pr,inv('Away:'));cecho(pr,'ICON - Iconify on Away' wt('aicon'));cecho(pr,'AWTXT - Send away/back messages' wt('awaytxt'));cecho(pr,'AWVRB - Include Loger/Pager status in msg' wt('awayverb'));cecho(pr,'AWNICK - Rename to a nick when away' wt('awaynick'));cecho(pr,'LOG - Log messages when set away' wt('log'));cecho(pr,'HLOG - Log Hilites when set away' wt('hlog'));cecho(pr,'DCCLOG - Log Msgs via DCC Chat when set away' wt('dcclog'));cecho(pr,'PAGE - Pager' wt('page'));cecho(pr,inv('Misc:'));cecho(pr,'AJOIN - AutoJoin on Invite' wt('autojoin'));cecho(pr,'AGET - DCC AutoGet' wt('autoget'));cecho(pr,'ASND - AutoSend Sounds' wt('asound'));cecho(pr,'AMSND - AutoMove sounds to sounds dir' wt('amsound'));cecho(pr,'LOAD - Reload Configurations');cecho(pr,'SAVE - Save Configuration');end;exit;wt:PROCEDURE;x=getclip('sc_'||lower(arg(1)));if x='' then x='UNSET';return '['bld(x)']';toggle:;t='sc_'||lower(arg(1));if getclip(t)='ON' then x='OFF';else x='ON';Setclip(t,x);return '['bld(x)']';lower:;return translate(arg(1),xrange('a','z'),xrange('A','Z'));cecho:;"ECHO P="d2c(27)"b«"arg(1)"» TEXT" arg(2);return 0;vecho:;"ECHO P="d2c(27)"b«KConfig»" und(arg(1)||':') arg(2)'.';return 0;bld:;bld=x2c('02');return bld||arg(1)||bld;und:;und=x2c('1F');return und||arg(1)||und;inv:;inv=x2c('16');return inv||arg(1)||inv;verifynarg:;return datatype(arg(1),'N')&arg(1)~='.';notice:;'RAW NOTICE' arg(1) ':'arg(2);return 0;getnick:;"GETMYNICK";return result;userdomain:PROCEDURE;ip=arg(1);if datatype(compress(ip,'.'),'n') then return substr(ip,1,pos('.',ip,pos('.',ip)+1))||'*';pi=translate(strip(lower(reverse(ip))),' ','.');w=words(pi);if w<3 then return ip;do i=3 to w;if ~datatype(word(pi,i),'L') then leave;end;return '*'||translate(reverse(delword(pi,i)),'.',' ');gethost:"USERHOST" arg(1);return result;uexists:if pos('@',gethost(arg(1)))~==0 then return 1;else return 0;ctcpreply:;'RAW NOTICE' arg(1) ':'div||command arg(2)div;return 0;amrx:;'SAY /RX' arg(1);return 0;getnumip:PROCEDURE;x=arg(1);cecho('NumericIP','Quering' x);address command 'amitcp:bin/askhost' x '>t:temphost';open(1,'t:temphost','R');do until rl='address list:';rl=readln(1);end;x=strip(readln(1));close(1);delete('t:temphost');return x;rts:;if ~show('L','rexxreqtools.library') then if ~addlib('rexxreqtools.library',0,-30,0) then;do;vecho('Fatal Error','Cannot load rexxreqtools.library');exit;end;"INFO screen";tags='rt_pubscrname="'result'"';return 0;resnick:PROCEDURE;tnick=arg(1);Select;when pos('@',tnick)~=0 then;do;"GETSELECTEDUSER";tnick=result;end;when pos('*',tnick)~=0 then;do;"GETUSERS";users=compress(result,'@+');nix='';upper tnick;do until users='';parse var users nick users;"MATCHUSERHOST" nick'!*@*' tnick'*!*@*';if rc=1 then nix=nix nick;end;tnick=strip(nix);if tnick='' then;do;cecho('MatchNick','Unable to match');exit;end;if words(tnick)>1 then;do;cecho('MatchNick','Multiple nicks found :' tnick);exit;end;end;otherwise;end;return tnick;syntax:;"ECHO P=Syntax Command on line" SIGL "returned" RC ":" errortext(rc) sourceline(SIGL);exit;chanpass:;achan=getclip('sc_autochannels');if achan=='ALL' then return 1;if find(achan,upper(channel))~==0 then return 1;return 0;showc:;pr='Channel';"GETCHANNEL";channel=result;if ~chanpass() then;do;cecho(pr,Channel 'not enabled');exit;end;prot=getclip('sc_prot');fprot=getclip('sc_fprot');autop=getclip('sc_autop');sban=getclip('sc_sban');rvg=getclip('sc_rvg');deop=getclip('sc_deop');if deop=='ON'|deop=='FRIENDS' then;do;x=getclip('sc_deopc');if x~=='ALL' then if pos(upper(channel),x)==0 then break;dopnf='ON';end;cecho(pr,inv(Channel 'Enabled with:'));If prot=='ON' then;do;cecho(pr,bld('Channel protection enabled'));str='';cecho(pr,'MassModes Protection: MassDeop' wt('mdeop') 'MassOp' wt('mop') 'MassBan' wt('mban') 'MassUnBan' wt('muban') 'Sensor' wt('sensormode'));if getclip('sc_sban')=='ON' then cecho(pr,'Screwbans will be auto-removed');if getclip('sc_nhp')=='ON' then;do;cecho(pr,'Nethack protection is enabled');cecho(pr,countf('o') 'users ignored for nethacking');end;cecho(pr,countf('v') 'users ignored for channel protection.');end;if fprot='ON' then;do;cecho(pr,bld('Friends protection enabled'));cecho(pr,countf('p') 'protected users.');cecho(pr,countf('v') 'users will not be protected from.');select;when rvg='ON' then cecho(pr,'Revenge enabled on all users.');when rvg='NONP' then cecho(pr,'Revenge enabled on non-protected users');otherwise;cecho(pr,'Friends Kick Protection disabled');cecho(pr,'Revenge disabled');end;end;if dopnf='ON' then;do;cecho(pr,bld('BiTcH mode enabled'));cecho(pr,countf('v') 'ignored users may give ops');if deop='FRIENDS' then cecho(pr,countf('o') 'other users may give ops');end;cecho(pr,bld('Friends'));if autop='ON' then cecho(pr,countf('o') 'users opped on join');else cecho(pr,'AutoOps disabled');cecho(pr,countf('e') 'users voiced on join');cecho(pr,countf('b') 'users banned on join');cecho(pr,countf('d') 'users disallowed ops');if getclip('sc_comprefix')~='' then;do;cecho(pr,bld('Channel commands enabled'));cecho(pr,countf('s') 'remote sysops with friends list access');cecho(pr,countf('c') 'users allowed to access remote commands');end;else cecho(pr,'Channel commands disabled');exit;check:;if args='' then;do;cecho('CheckUser','Usage : /kc CHECK [NICK]|[USER]|[HOSTMASK]');exit;end;amrx('kuang11.AMIRX :'args 'whois');exit;rvgm:;pr='RevengeAct';upper args;if args='' then;do;cecho(pr,'Usage : /kc RVGA [KICK] [BAN] [DEOP]');exit;end;if pos('KICK',args)=0 then setclip('sc_rvgk','OFF');else setclip('sc_rvgk','ON');if pos('BAN',args)=0 then setclip('sc_rvgb','OFF');else setclip('sc_rvgb','ON');if pos('DEOP',args)=0 then setclip('sc_rvgd','OFF');else setclip('sc_rvgd','ON');cecho(pr,'Deop:'wt('rvgd') 'Kick:'wt('rvgk','OFF') 'Ban:'wt('rvgb'));exit;bank:;vecho('KickWords Ban',toggle('bankickwords'));if getclip('sc_bankickwords')='ON'&getclip('sc_maxword')='' then;do;args=3;maxk();end;exit;maxk:;pr='Maximum WordKicks';x=getclip('sc_maxword');args=strip(args);if ~datatype(args,'W') then vecho(pr,'Usage : /kc MAXK <N>');else;do;setclip('sc_maxword',args);x=args;end;vecho(pr,'Currently set to' bld(x));exit;awtxt:;x=getclip('sc_awaytxt');Select;when x=''|x='OFF' then x='TEXT';when x='TEXT'|x='ON' then x='SOUND';when x='SOUND' then x='BOTH';otherwise;x='OFF';end;setclip('sc_awaytxt',x);vecho('Away Messages','['bld(x)']');exit;autoget:;x=getclip('sc_autoget');Select;when x='OFF'|x='' then x='ALL';when x='ALL' then x='ALLFRIENDS';when x='ALLFRIENDS' then x='FRIENDS';otherwise;x='OFF';end;setclip('sc_autoget',x);cecho('Autoget','['bld(x)']');exit;autojoin:;x=getclip('sc_autojoin');select;when x='OFF'|x='' then x='ALL';when x='ALL' then x='FRIENDS';otherwise;x='OFF';end;setclip('sc_autojoin',x);cecho('AutoJoin','['bld(x)']');exit;xstyle:;x=getclip('sc_xdccstyle');if x='LONG' then x='SHORT';else x='LONG';setclip('sc_xdccstyle',x);cecho('XDCCStyle','['bld(x)']');exit;asnd:;vecho('AutoSend Sounds',toggle('asound'));if getclip('sc_asound')='ON' then;do;x=getnick();'SAY /HILITE "!'||x||'"';setclip('st_asoundnick',x);end;else;do;x='!'||getclip('st_asoundnick');if getclip('sc_comprefix')~=x&find(getclip('sc_swords'),x)=0 then 'SAY /UNHILITE "'||x||'"';end;exit;deopc:;pr='AutoDeop Non-Friends Channels';if args='' then;do;vecho(pr,'Usage : /KC BITCHC [#CHANNEL]|[ALL] <#CHANNEL> ...');end;else;do;setclip('sc_deopc',upper(args));end;vecho(pr,'['getclip('sc_deopc')']');exit;xslot:;pr='XDCCSlots';x=getclip('sc_xdccslots');args=strip(args);if ~datatype(args,'W') then cecho(pr,'Usage : /kc XSLOT [N]');else;do;setclip('sc_xdccslots',args);x=args;end;cecho(pr,'Currently set to' bld(x));exit;sec:;x=getclip('sc_xdccsec');select;when x='OFF'|x=''|x='ON' then x='OPS';when x='OPS' then x='PACKS';when x='PACKS' then x='ALL';otherwise;x='OFF';end;setclip('sc_xdccsec',x);cecho('XDCCSec','['bld(x)']');exit;deop:;x=getclip('sc_deop');select;when x='OFF'|x='' then x='FRIENDS';when x='FRIENDS' then x='ON';otherwise;x='OFF';end;setclip('sc_deop',x);vecho('AutoDeop Non-Friends','['bld(x)']');exit;rvg:;x=getclip('sc_rvg');select;when x='OFF'|x='' then x='NONP';when x='NONP' then x='ON';otherwise;x='OFF';end;setclip('sc_rvg',x);cecho('Revenge','['bld(x)']');exit;page:;pr='Pager';x=getclip('sc_page');Select;when x='OFF'|x='' then x='ON';when x='ON' then x='FRIENDS';otherwise;x='OFF';end;setclip('sc_page',x);cecho(pr,'['bld(x)']');exit;kickmsg:;pr='Kick Reason';x=getclip('sc_pkickmsg');args=strip(args);if args='' then;do;vecho(pr,'Usage : /kc KICKMSG [Msg]');end;else;do;setclip('sc_pkickmsg',args);x=args;end;vecho(pr,'Currently set to' bld(x));exit;awnick:;pr='AwayNick';x=getclip('sc_awaynick');args=strip(args);if args='' then;do;cecho(pr,'Usage : /kc AWNICK [Nick]');end;else;do;setclip('sc_awaynick',args);x=args;end;cecho(pr,'Currently set to' bld(x));exit;floodmsg:;pr='Flood Message';x=getclip('sc_floodmsg');args=strip(args);if args='' then;do;vecho(pr,'Usage : /kc FLOODMSG [Msg]');end;else;do;setclip('sc_floodmsg',args);x=args;end;vecho(pr,'Currently set to' bld(x));exit;Password:;pr='Password';x=getclip('sc_password');args=strip(args);if args='' then;do;cecho(pr,'Usage : /kc PASS [PASSWORD]');end;else;do;setclip('sc_password',args);x=args;end;cecho(pr,'Currently set to' bld(x));exit;chan:;pr='Channels';x=getclip('sc_autochannels');args=strip(upper(args));if args='' then;do;cecho(pr,'Usage : /kc CHAN [#CHANNEL1] <#CHANNEL2> ... or ALL');end;else;do;setclip('sc_autochannels',args);x=args;end;cecho(pr,'Currently set to' bld(x));exit;comprefix:;pr='ComPrefix';args=strip(upper(args));com=getclip('sc_comprefix');if args='' then cecho(pr,'Usage : /kc COMP [PREFIX]');else;do;setclip('sc_comprefix',args);if find(getclip('sc_swords'),com)=0 then 'SAY /UNHILITE "'com'"';'SAY /HILITE "'args'"';com=args;end;cecho(pr,'Currently set to' bld(com));exit;addk:;args=strip(upper(args));if args='' then;do;cecho('AddKWord','Usage : /kc ADDK [KICKWORD]');end;else;do;'SAY /HILITE "'args'"';setclip('sc_swords',getclip('sc_swords') args);end;listk:;cecho('KickWords','Currently set to' bld(getclip('sc_swords')));exit;delk:;pr='DelKWord';args=strip(upper(args));x=getclip('sc_swords');if args='' then;do;cecho(pr,'Usage : /kc DELK [KICKWORD]');listk();end;do i=1 to words(x);if word(x,i)=args then;do;setclip('sc_swords',strip(delword(x,i,1)));if getclip('sc_comprefix')~=args then 'SAY /UNHILITE "'args'"';listk();end;end;cecho(pr,bld(args) 'not found in KickWords List');exit;load:;cecho('Reload','Loading configuration');c=show('C');do i=1 to words(c);w=word(c,i);if substr(w,1,3)='sc_' then setclip(w);end;setclip('st_init');if args='' then;do;amrx('connected.amirx');end;exit;listf:;flags=lower(args);if flags~='' then vflags();pr='FList';l=getclip('st_list');if l='-' then;do;cecho(pr,'No Friends in list');exit;end;cn=0;cecho(pr,bld(und('Users list:')));do i=1 to words(l) by 3;x=word(l,i+2);if verify(flags,x)=0 then;do;cn=cn+1;cecho(trunc(i/3+1),bld(word(l,i+1)) inv(x) bld('[') word(l,i) bld(']'));end;end;cecho(pr,bld(cn) 'Matched requested flags ['flags']');exit;countf:PROCEDURE EXPOSE cnx;f=arg(1);l=getclip('st_list');cn=0;cnx='';if l='-' then return 0;do i=1 to words(l) by 3;x=word(l,i+2);if verify(f,x)=0 then;do;cn=cn+1;cnx=cnx word(l,i+1);end;end;return cn '(with' f 'flag)';showu:;pr='ShowUser';if args='' then;do;cecho(pr,'Usage: /Showu [USER]');exit;end;upper args;l=getclip('st_list');do i=1 to words(l) by 3;x=word(l,i+1);if args=upper(x) then;do;args=x word(l,i) word(l,i+2);whois();end;end;report(args 'not found');exit;delf:;pr='DelFriend';if args='' then;do;cecho(pr,'Usage: DELF [USER]');exit;end;l=getclip('st_list');do i=1 to words(l) by 3;if upper(word(l,i+1))=upper(args) then;do;setclip('st_list',delword(l,i,3));cecho(pr,'Removed' bld(args) '[' bld(word(l,i)) '] Flags' word(l,i+2));exit;end;end;cecho(pr,bld(args) 'not found in friends list');exit;addf:;parse var args nick flags host;nick=strip(nick);host=strip(lower(host));flags=strip(lower(flags));pr='AddFriend';if flags='' then;do;cecho(pr,'Usage: /ADDF [Nick] [flags] <hostmask>|<NUM>');cecho(pr,'Specifying keyword NUM will' bld('also add') 'the numeric hostmask');cecho(pr,bld('Flags are:'));cecho(pr,'o - AutoOp');cecho(pr,'x - XDCC Sec');cecho(pr,'i - Invite');cecho(pr,'p - Protect');cecho(pr,'d - Deop');cecho(pr,'b - Ban');cecho(pr,'a - AutoGet DCC');cecho(pr,'c - CTCP/Channel commands');cecho(pr,'e - Voice');cecho(pr,'v - Bot');cecho(pr,'s - Sysop');cecho(pr,bld('Presets are:'));cecho(pr,'all - oxipc');cecho(pr,'bot - vop');exit;end;vhost();l=getclip('st_list');do i=1 to words(l) by 3;if upper(word(l,i+1))=upper(nick) then;do;if pos(host,word(l,i))=0 then addh();setf();end;end;vflags();if verify(flags,'db','M')==0&uexists(nick) then;do;notice(nick,'You have been added to my friends list with flags' flags);notice(nick,bld('/CTCP' getnick() 'HELP') 'to get access help');end;if l='-' then l='';setclip('st_list',strip(l host nick flags));report(bld(nick) '[' bld(host) '] added with flags' bld(flags));exit;report:;rsys=getclip('st_rsys');if rsys~='' then;do;setclip('st_rsys');notice(rsys,arg(1));end;cecho(pr,arg(1));return 0;vflags:;if verify(flags,'oxipdbacves')~==0 then;do;Select;when flags='all' then flags='oxipc';when flags='bot' then flags='vop';otherwise;cecho(pr,'Illegle flags' bld(flags));exit;end;end;return 0;vhost:;if pos('@',host)=0 then;do;nick=resnick(nick);if ~uexists(nick) then;do;cecho(pr,bld(nick) 'does not exist');exit;end;hs=lower(gethost(nick));p=pos('@',hs);user=substr(hs,1,p);ip=substr(hs,p+1);Select;when host='numeric' then host=user||userdomain(getnumip(ip));when host='num' then host=translate(user||userdomain(ip),'*','+')'+'user||userdomain(getnumip(ip));otherwise;host=translate(user||userdomain(ip),'*','+');end;end;return 0;addh:;parse var args nick host .;nick=strip(nick);host=strip(lower(host));pr='AddHost';if nick='' then;do;cecho(pr,'Usage: /ADDH [NICK] <hostmask>|<NUM>');cecho(pr,'Specifying keyword NUM will add the numeric hostmask');exit;end;if host='num' then host='numeric';vhost();l=getclip('st_list');do i=1 to words(l) by 3;if upper(word(l,i+1))=upper(nick) then;do;if pos(host,word(l,i))=0 then;do;setclip('st_list',insert(host'+',l,wordindex(l,i)-1));report(bld(nick) 'added with host [' bld(host) ']');if uexists(nick) then notice(nick,'Added with host [' bld(host) ']');end;else report(bld(nick) 'already has host [' bld(host) ']');return 0;end;end;report(bld(nick) 'is not on userlist');return 0;delh:;parse var args nick host;nick=strip(upper(nick));host=strip(lower(host));pr='DelHost';if nick='' then;do;cecho(pr,'Usage: /DELH [NICK] [hostmask]');exit;end;vhost();l=getclip('st_list');do i=1 to words(l) by 3;if upper(word(l,i+1))=nick then;do;hosts=word(l,i);if pos('+',hosts)==0 then;do;report(bld(nick) 'has only one hostmask');exit;end;p=pos(host,hosts);if p~==0 then;do;hosts=translate(hosts,' ','+');hosts=translate(strip(delword(hosts,find(hosts,host),1),'T','+ '),'+',' ');setclip('st_list',insert(hosts' ',delword(l,i,1),wordindex(l,i)-1));report(bld(nick) 'Removed host [' bld(host) ']');if uexists(nick) then notice(nick,'Removed host [' bld(host) ']');end;else report(bld(nick) 'does not have host [' bld(host) ']');exit;end;end;report(bld(nick) 'is not on userlist');exit;setf:;parse var args nick flags .;nick=strip(nick);flags=strip(lower(flags));pr='SetFlags';if nick=''|flags='' then;do;cecho(pr,'Usage: /SETF [USER] [FLAGS]');cecho(pr,'/ADDF to see list of flags');exit;end;vflags();l=getclip('st_list');do i=1 to words(l) by 3;if upper(word(l,i+1))=upper(nick) then;do;setclip('st_list',insert(flags' ',delword(l,i+2,1),wordindex(l,i+2)-1));report(bld(nick) 'set with flags [' bld(flags) ']');if verify(flags,'db','M')==0&uexists(nick) then notice(nick,'Set with flags [' bld(flags) ']');exit;end;end;report(bld(nick) 'is not on userlist');exit;rename:;parse var args nick tnick;nick=strip(nick);tnick=strip(tnick);pr='Rename';if nick=''|tnick='' then;do;cecho(pr,'Usage: /RENM [NICK] [NEWNICK]');exit;end;l=getclip('st_list');do i=1 to words(l) by 3;if upper(word(l,i+1))=upper(nick) then;do;setclip('st_list',insert(tnick' ',delword(l,i+1,1),wordindex(l,i+1)-1));report(bld(nick) 'renamed to ' bld(tnick));if verify(flags,'db','M')==0 then;do;if uexists(tnick) then notice(tnick,'Renamed to' bld(tnick) 'in userlist');else if uexists(nick) then notice(nick,'Renamed to' bld(tnick) 'in userlist');end;exit;end;end;report(bld(nick) 'is not on userlist');exit;savef:;pr='Save';l=strip(getclip('st_list'));if l='' then;do;cecho(pr,'No Friends in list');exit;end;fn='Kuang11/Friends';if ~open(f,fn,'W') then;do;cecho(pr,'Failed to open file' fn);exit;end;do i=1 to words(l) by 3;Writeln(f,word(l,i) word(l,i+1) word(l,i+2));end;close(f);report('Saved userlist.');exit;save:;pr='Save';fn='Kuang11/Config';if ~open(f,fn,'W') then;do;cecho(pr,'Failed to open file' fn);exit;end;l=show('c');do i=1 to words(l);x=strip(word(l,i));if substr(x,1,3)='sc_' then writeln(f,substr(x,4) getclip(x));end;close(f);cecho(pr,'Saved configuration');exit;xansi:;cecho('XDCCANSI',toggle('xdccbold'));exit;xdcckick:;cecho('XDCCKick',toggle('xdcckick'));exit;xdccrate:;cecho('XDCCRates',toggle('xdccrates'));exit;sban:;vecho('ScrewBan Protection',toggle('sban'));exit;mdeop:;vecho('MassDeop Protection',toggle('mdeop'));exit;mban:;vecho('MassBan Protection',toggle('mban'));exit;muban:;vecho('MassUnBan Protection',toggle('muban'));exit;mop:;vecho('MassOp Protection',toggle('mop'));exit;mkick:;vecho('MassKick Protection',toggle('mkick'));exit;mjoin:;vecho('MassJoin Protection',toggle('mjoin'));exit;log:;vecho('Away Logging',toggle('log'));exit;hlog:;vecho('Hilite Away Logging',toggle('hlog'));exit;icon:;cecho('AwayIconify',toggle('aicon'));exit;floodp:;vecho('Flood Protection',toggle('floodp'));exit;prot:;vecho('Channel Protection',toggle('prot'));exit;ctcpauto:;vecho('Extended CTCP',toggle('ctcpauto'));exit;nhp:;vecho('NetHack Protection',toggle('nhp'));exit;randel:;vecho('Random Delayed Ops',toggle('randel'));exit;autop:;cecho('AutoOp',toggle('autop'));exit;fprot:;vecho('Friends Protection',toggle('fprot'));exit;xdcc:;cecho('XDCC',toggle('xdcc'));exit;dcclog:;cecho('DCCLog',toggle('dcclog'));exit;ident:;cecho('CTCPIdent',toggle('ctcpident'));exit;awayverb:;cecho('AwayVerb',toggle('awayverb'));exit;saveb:;cecho('SaveBan',toggle('saveban'));exit;xdccm:;vecho('Kick Mass XDCC List',toggle('xdcc_masskick'));exit;amsound:;vecho('AutoMove Sounds',toggle('amsound'));exit;shit:;cecho('KickWords',toggle('shit'));l=getclip('sc_swords');if l~='' then;do;if getclip('sc_shit')='ON' then ou='SAY /HILITE';else ou='SAY /UNHILITE';do i=1 to words(l);ou '"'upper(word(l,i))'"';end;end;exit;igtime:;pr='IgnoreTime';x=getclip('sc_ig_count');if length(args)~=1|datatype(args,'n')=0 then cecho(pr,'Usage: /KC IGTIME <N> (1-9 minutes)');else;do;setclip('sc_ig_count',args);x=args;end;cecho(pr,'Current setting:' x 'minutes');exit;autopdel:;pr='AutoOpDelay';x=getclip('sc_autopdel');if datatype(args,'n')=0 then cecho(pr,'Usage: /KC OPDEL <N> - N is in seconds.0 to disable.');else;do;if args=0 then args='';setclip('sc_autopdel',args);x=args;end;cecho(pr,'Current setting:' x 'seconds');exit;sensors:;if args='' then cecho('Sensors','Usage: /kc SENS <RESET> <MSG> <CTCP> <NOTICE> <DCC> <MODE> <KICK> <JOIN> <INVITE> replace an argument with "." to be skipped');else;do;parse var args RESET MSG CTCP NOTICE DCC MODE KICK JOIN INVITE .;if verifynarg(reset) then Setclip('sc_resetcount',reset);if verifynarg(msg) then setclip('sc_sensorprivmsg',msg);if verifynarg(ctcp) then setclip('sc_sensorctcp',ctcp);if verifynarg(notice) then setclip('sc_sensornotice',notice);if verifynarg(dcc) then setclip('sc_sensordcc',dcc);if verifynarg(mode) then setclip('sc_sensormode',mode);if verifynarg(kick) then setclip('sc_sensorkick',kick);if verifynarg(join) then setclip('sc_sensorjoin',join);if verifynarg(invite) then setclip('sc_sensorinvite',invite);end;cecho('Sensors','Reset:'getclip('sc_resetcount') 'Msg:'getclip('sc_sensorprivmsg') 'CTCP:'Getclip('sc_sensorctcp') 'Notice:'getclip('sc_sensornotice') 'DCC:'getclip('sc_sensordcc') 'Mode:'getclip('sc_sensormode') 'Kick:'getclip('sc_sensorkick'));exit;whois:;parse var args nk hm fl;acs='';ln3='';cr='0A'x;if pos('c',fl)~=0 then;do;c=1;acs=acs'CTCP Commands,Channel Commands';cp=getclip('sc_comprefix');pc=bld('Channel commands Prefix:') cp;cc=bld('CTCP commands:') 'IDENT HELP WHOIS';end;if pos('e',fl)~=0 then;do;e=1;acs=acs',Voiced On Join';end;if pos('o',fl)~=0 then;do;o=1;acs=acs',Oped on Join';cc=cc 'KICK UNBAN';end;if pos('i',fl)~=0 then;do;i=1;acs=acs',Invite';cc=cc 'INVITE';end;if pos('x',fl)~=0 then;do;x=1;acs=acs',XDCC';cc=cc 'XDCC';end;if pos('p',fl)~=0 then;do;p=1;acs=acs',Protected';end;if pos('d',fl)~=0 then;do;d=1;acs=acs',DeOped';end;if pos('b',fl)~=0 then;do;b=1;acs=acs',Banned';end;if pos('a',fl)~=0 then;do;a=1;acs=acs',DCC Autoget';end;if pos('v',fl)~=0 then;do;b=1;acs=acs',Bot';end;if pos('s',fl)~=0 then;do;s=1;acs=acs' , Sysop';pc=pc cp'ADDF' cp'ADDH' cp'SETF' cp'SAVE';end;ln1=und(bld(nk) 'hostmasks [' hm ' ] flags [' fl ']');ln2=bld('Privliges:') strip(acs,'L',', ')'.';rsys=getclip('st_rsys');if rsys='' then;do;pr='ShowUser';cecho(pr,ln1);cecho(pr,ln2);if c=1 then;do;cecho(pr,pc);cecho(pr,cc);end;end;else;do;setclip('st_rsys');do while getclip('st_wh')=1;delay(150);end;setclip('st_wh',1);command='WHOIS';ctcpreply(rsys,ln1);ctcpreply(rsys,ln2);if c=1 then;do;ctcpreply(rsys,pc);ctcpreply(rsys,cc);end;vecho('CTCP WHOIS','Sent whois to' bld(rsys) 'about' bld(nk));delay(300);setclip('st_wh');end;exit